# eric7.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.HgQueuesDefineGuardsDialog

Module implementing a dialog to define guards for patches.

### Global Attributes

None

### Classes

HgQueuesDefineGuardsDialog | Class implementing a dialog to define guards for patches.

### Functions

None

## HgQueuesDefineGuardsDialog

Class implementing a dialog to define guards for patches.

### Derived from

QDialog, Ui_HgQueuesDefineGuardsDialog

### Class Attributes

None

### Class Methods

None

### Methods

HgQueuesDefineGuardsDialog | Constructor
__applyGuards | Private slot to apply the defined guards to the current patch.
__getGuard | Private method to get a reference to a named guard.
closeEvent | Protected slot implementing a close event handler.
on_addButton_clicked | Private slot to add a guard definition to the list or change it.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_guardCombo_editTextChanged | Private slot to handle changes of the text of the guard combo.
on_guardsList_itemSelectionChanged | Private slot to handle changes of the selection of guards.
on_patchSelector_activated | Private slot to get the list of guards defined for the given patch name.
on_removeButton_clicked | Private slot to remove guard definitions from the list.
start | Public slot to start the list command.

### Static Methods

None

#### HgQueuesDefineGuardsDialog (Constructor)

HgQueuesDefineGuardsDialog(vcs, extension, patchesList, parent=None)

Constructor

vcs (Hg)
  reference to the vcs object
extension (Queues)
  reference to the extension module
patchesList (list of str)
  list of patches
parent (QWidget)
  reference to the parent widget

#### HgQueuesDefineGuardsDialog.__applyGuards

__applyGuards()

Private slot to apply the defined guards to the current patch.

#### HgQueuesDefineGuardsDialog.__getGuard

__getGuard(guard)

Private method to get a reference to a named guard.

guard (str)
  name of the guard

Return:
  reference to the guard item

Return Type:
  QListWidgetItem

#### HgQueuesDefineGuardsDialog.closeEvent

closeEvent(e)

Protected slot implementing a close event handler.

e (QCloseEvent)
  close event

#### HgQueuesDefineGuardsDialog.on_addButton_clicked

on_addButton_clicked()

Private slot to add a guard definition to the list or change it.

#### HgQueuesDefineGuardsDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button (QAbstractButton)
  button that was clicked

#### HgQueuesDefineGuardsDialog.on_guardCombo_editTextChanged

on_guardCombo_editTextChanged(txt)

Private slot to handle changes of the text of the guard combo.

txt (str)
  contents of the guard combo line edit

#### HgQueuesDefineGuardsDialog.on_guardsList_itemSelectionChanged

on_guardsList_itemSelectionChanged()

Private slot to handle changes of the selection of guards.

#### HgQueuesDefineGuardsDialog.on_patchSelector_activated

on_patchSelector_activated(index)

Private slot to get the list of guards defined for the given patch name.

index (int)
  index of the selected entry

#### HgQueuesDefineGuardsDialog.on_removeButton_clicked

on_removeButton_clicked()

Private slot to remove guard definitions from the list.

#### HgQueuesDefineGuardsDialog.start

start()

Public slot to start the list command.

Up